A good answer might be:

  1. Will the instance variable balance hold a permanent value?
    • Yes—balance is part of the state of the object and will hold a value as long as the object exists.
  2. Will the parameter amount hold a permanent value?
    • No—amount is used only to pass in a value to the method. It does not have a permanent existance.

Formal and Actual Parameters

The following definitions are useful:

When a method is called, the formal parameter is temporarily "bound" to the actual parameter. The method can then use a name to stand for the actual value that the caller wanted to be used. For example, this statement from a method uses the parameter amount to stand for the actual value used in the procedure call:

balance = balance + amount ; 

Important Note: formal parameters are bound to an actual value only as long as their method is active. When a method returns to its caller, the formal parameters no longer contain any values. They cannot be used to store the state of an object.

QUESTION 3:

What is used to store the state of an object?